#include "EchoServer.hpp"
#include <memory>

void Usage(std::string proc)
{
    std::cerr << "Usage: " << proc << "local port" << std::endl;
}

int main(int argc, char *argv[])
{
    if (argc != 2)
    {
        Usage(argv[0]);
        exit(0);
    }
    Console();
    uint16_t localport = std::stoi(argv[1]);

    std::unique_ptr<EchoServer> es = std::make_unique<EchoServer>(localport);
    es->Init();
    es->Start();
    
    return 0;
}